class BackendController < ApplicationController
  
  def check_elections_activity
    active_elections =  Election.find_all_by_active(true)
    active_elections.each do |e|
      e.close_if_time
    end
    notstarted_elections =  Election.find_all_by_active_and_expired(false,false)
    notstarted_elections.each do |e|
      e.start_if_time
    end
    
    render(:nothing => true) and return
  end
  
end
